package com.libgdxbar.pvzlikegame;

import com.badlogic.gdx.Game;
import com.libgdxbar.pvzlikegame.screens.ScreenManager;
import com.libgdxbar.pvzlikegame.screens.gamescreens.ExceptionCaptorTestScreen;
import com.libgdxbar.pvzlikegame.screens.gamescreens.ShapeAndTextureEntityScreen;
import com.libgdxbar.pvzlikegame.screens.gamescreens.SplashScreen;
import com.libgdxbar.pvzlikegame.screens.gamescreens.UISkinThemeScreen;

// 主游戏类
public class MainGame extends Game {

	@Override
	public void create() {
		ScreenManager.getInstance()
			. addScreen(new SplashScreen())
			. addScreen(new UISkinThemeScreen())
			. addScreen(new ShapeAndTextureEntityScreen())
			. addScreen(new ExceptionCaptorTestScreen())
			. setLaunchScreen(SplashScreen.class);
	}

	@Override
	public void render() {
		ScreenManager.getInstance().render();
	}

	@Override
	public void resize(int width, int height) {
		ScreenManager.getInstance().resize(width, height);
	}

	@Override
	public void dispose() {
		ScreenManager.getInstance().dispose();
	}
}
